<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<c:set var="ctx" value="<%=basePath%>" />
<!DOCTYPE html>
<html lang="en">
<head>
    <base href="<%=basePath%>">
    <title>云净</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">    
    <meta name="format-detection" content="telephone=no, email=no">
    <meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="renderer" content="webkit">
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-orientation" content="portrait">
    <meta http-equiv="keywords" content="云净,透析单,网页透析" />
	<meta http-equiv="description" content="云净透析单" />
	<link href="image/yunjing/logo.ico" type="image/x-icon" rel="shortcut icon">
    <link rel="stylesheet" type="text/css" href="${ctx}css/common/base.css" />
    <link rel="stylesheet" type="text/css" href="${ctx}css/mtxform_zbyyj.css" />
    <style>
         /* 解决触摸延迟 */
        html {
            touch-action: manipulation;
        }
        a[title="站长统计"]{display: none;}
        td{
        	text-align:center;
        }
        #warningTableContent td{
        	font-size:14px;
        }
        .empty-td{
        	background: #f7f7f7 !important;
        	padding:36px !important;
        	border:0 !important;
        	border:none;
        }
        .empty-tr{
        	border:0 !important;
        	border:none !important;
        }
    </style>
</head>

<body>
	<div id="warningHeader">
		<a href="javascript:void(0);" onclick="window.location.href='txform/mtxform.shtml'" class="back_a" 
		style="display:inline-block;padding-right:4rem;font-size: 18px; color: #3da2ee;">
          <img src="image/yunjing/mtxform/go_back.svg" alt="返回" class="back_pic" style="width:22px;height:22px;">返回
        </a>
		<span>预警内容：</span>
		<select class="form-control" name="warningDetails" id="warningDetails" >
	      <option value="1">自备药预警&nbsp;</option>
		  <option value="2">费用预警&nbsp;</option>
         </select>
	</div>
	<div id="warningTableTitle">
		<table>
			<tr>
				<td class="serial-number">序号</td>
				<td class="patient-name">患者姓名</td>
				<td class="warning-content">预警内容</td>
			</tr>
		</table>
	</div>
	<div id="warningTableContent">
		<table>
			<tr class="empty-tr">
				<td class="empty-td"><img src="image/loading.gif"  /></td>
			</tr>
		</table>
	</div>
</body>
 <script type="text/javascript" src="js/jquery/jquery-1.9.1.min.js"></script> 
 <script type="text/javascript" src="js/layer/layer.js"></script> 
 <script type="text/javascript" src="js/common/disable-change-font.js"></script>
 <script src="https://s22.cnzz.com/z_stat.php?id=1262287469&web_id=1262287469" language="JavaScript"></script>
 <script>
  $(function(){
  		//查询自备药预警信息
	    function zbyWarning(){
		    $.post("txform/getzbyyjlist.shtml",function(data){
	            if(data.res!=null&&data.res.length>0){
	              $("#warningTableContent>table").empty();
	              $.each(data.res,function(index,item){
	                 $("#warningTableContent>table").append(
	                   "<tr>" 
	                   +"<td class='serial-number'>"+(index+1)+"</td> <td class='patient-name'><span>"+item.tx_name+"</span> <br><span>"+item.tx_number+"</span></td> "
	                   +"<td class='warning-content'> <div><span class='drug-name'>"+item.tx_content+"</span></div> </td>"
	                   +"</tr>"
	                 );
	              });
	            }else{
	              $("#warningTableContent>table").empty().append("<tr class='empty-tr'><td class='empty-td'>暂无数据</td></tr>");
	            }
		    });
	    }
	    
	    //查询费用预警信息
	    function fyWarning(){
	    	layer.msg("敬请期待")
	    	$("#warningTableContent>table").empty();
	    }
	    
	    zbyWarning()//默认显示
	    
	    $("#warningDetails").on("change",function(){
			if($("#warningDetails").val() == "1"){
				zbyWarning()
			}
			if($("#warningDetails").val() == "2"){
				fyWarning()
			}
		});
  });
 </script>
</html>